/* 时间范围选择样式 */

.time-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.range-selector {
    display: flex;
    gap: 10px;
}

.range-selector button {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.range-selector button.active {
    background: #2196f3;
    color: #fff;
    border-color: #2196f3;
}

.custom-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-range input {
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}


/* 概览卡片样式 */

.overview-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 16px;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.unit {
    font-size: 14px;
    color: #666;
}

.trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.trend.up {
    color: #4caf50;
}

.trend.down {
    color: #f44336;
}

.period {
    color: #666;
}


/* 图表容器样式 */

/* 新增网格布局 */
.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* 优化表格样式 */
.data-table {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.data-table th {
  background: #f8f9fa;
  padding: 16px;
  font-weight: 600;
}

.data-table td {
  padding: 12px 16px;
  border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .charts-container {
    grid-template-columns: 1fr;
  }
  
  .time-range {
    flex-direction: column;
    gap: 15px;
  }
}
.chart-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-header h3 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-actions button {
    padding: 4px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-actions button.active {
    background: #2196f3;
    color: #fff;
    border-color: #2196f3;
}

.chart-content {
    height: 300px;
}

.chart {
    width: 100%;
    height: 100%;
}


/* 数据表格样式 */

.data-table {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.table-header h3 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-content {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f5f5f5;
    color: #666;
    font-weight: 500;
}

tr:hover {
    background: #f8f9fa;
}


/* 按钮样式 */

.btn-primary,
.btn-secondary {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2196f3;
    color: #fff;
    border: none;
}

.btn-secondary {
    background: #fff;
    color: #2196f3;
    border: 1px solid #2196f3;
}

.btn-primary:hover {
    background: #1976d2;
}

.btn-secondary:hover {
    background: #e3f2fd;
}


/* 响应式设计 */

@media (max-width: 1200px) {
    .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .overview-cards {
        grid-template-columns: 1fr;
    }
    .time-range {
        flex-direction: column;
        gap: 10px;
    }
    .table-header {
        flex-direction: column;
        gap: 10px;
    }
    .table-actions {
        width: 100%;
        justify-content: space-between;
    }
}